﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using MotoGame.Estados;
using MotoGame.Jogo.Estados.Menu;

namespace MotoGame.Jogo.Estados.Credito
{
    /// <summary>
    /// Exibe a tela de créditos
    /// </summary>
    class Credito : EstadoBase
    {
        Botao back;
        Texture2D textura;

        public Credito(ContentManager Content, GameWindow Window)
            : base(Content, Window)
        {
            textura = Content.Load<Texture2D>("Menu/Texturas/sapo_moto");
            back = new Botao(Content, Window, "Menu/Texturas/back");
            back.posicao = new Vector2(270, 300);
        }

        public override void Update(GameTime gameTime)
        {
            back.Update(gameTime);

            if (Game1.teclado_atual.IsKeyDown(Keys.Back))
            {
                Game1.estado_atual = Game1.Estado.MENU;
            }
        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(textura, new Rectangle(0, 0, 800, 480), Color.White);

            back.Draw(gameTime, spriteBatch);
            spriteBatch.DrawString(Game1.arial, "   CREDITOS   ", new Vector2(10, 50), Color.Red);
            spriteBatch.DrawString(Game1.arial, "Professor:  Cleber Tavares Jr", new Vector2(10, 100), Color.Red);
            spriteBatch.DrawString(Game1.arial, "Alunos:  Eduardo Canongia, Luiz Daniel, Rodrigo Señorans", new Vector2(10, 150), Color.Red);
            spriteBatch.DrawString(Game1.arial, "               Hamilton Pessi, Lucas Lima, Rafael Alves", new Vector2(10, 180), Color.Red);
        }

    }
}
